package com.ruoyi.user.service.impl;

import com.ruoyi.user.domain.CouponTemplate;
import com.ruoyi.user.mapper.CouponTemplateMapper;
import com.ruoyi.user.service.ICouponTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CouponTemplateServiceImpl implements ICouponTemplateService {

    @Autowired
    private CouponTemplateMapper couponTemplateMapper;

    @Override
    public CouponTemplate selectCouponTemplateByCouponId(Long couponId) {
        return couponTemplateMapper.selectCouponTemplateByCouponId(couponId);
    }

    @Override
    public List<CouponTemplate> selectCouponTemplateList(CouponTemplate couponTemplate) {
        return couponTemplateMapper.selectCouponTemplateList(couponTemplate);
    }

    @Override
    public int insertCouponTemplate(CouponTemplate couponTemplate) {
        return couponTemplateMapper.insertCouponTemplate(couponTemplate);
    }

    @Override
    public int updateCouponTemplate(CouponTemplate couponTemplate) {
        return couponTemplateMapper.updateCouponTemplate(couponTemplate);
    }

    @Override
    public int deleteCouponTemplateByCouponIds(Long[] couponIds) {
        return couponTemplateMapper.deleteCouponTemplateByCouponIds(couponIds);
    }

    @Override
    public int deleteCouponTemplateByCouponId(Long couponId) {
        return couponTemplateMapper.deleteCouponTemplateByCouponId(couponId);
    }
}